package cn.ljx.dao.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import cn.ljx.dao.UserDao;
import cn.ljx.entity.TBUser;
import cn.ljx.mapping.TBUserMapper;


@Repository("UserDao")
public class UserDaoImpl implements UserDao{
	
	@Resource(name = "TBUserMapper")
    private TBUserMapper tbUserMapper;
	
	
	public TBUser getUserByName(String username) {
        return tbUserMapper.getUserByName(username);
	}



	public int deleteUser(String login_name) {
		return tbUserMapper.delectUser(login_name);
	}


	public int addUser(TBUser tbuser) {
		return tbUserMapper.addUser(tbuser);
	}


	public TBUser getUserById(String id) {
		return tbUserMapper.getUserById(id);
	}


	public int updateUser(TBUser tbuser) {
		// TODO Auto-generated method stub
		return tbUserMapper.updateUser(tbuser);
	}



	public List<TBUser> gettbUserList(String real_name) {
		// TODO Auto-generated method stub
		return tbUserMapper.gettbUserList(real_name);
	}

}
